package com.hskj.localUtil;

import com.hskj.info.PageInfo;

public class LocalPageUtil {
    //创建线程对象 要实现共享数据
    private static ThreadLocal<PageInfo> localpageInfoThreadLocal=new ThreadLocal<>();

    //k v {total:20} map
    public static void set(PageInfo pageInfo){
        localpageInfoThreadLocal.set(pageInfo);
    }
    // get都是只读
    public static PageInfo get(){
        return localpageInfoThreadLocal.get();
    }
    // 删除标签数据 如果不及时删除就会导致数据溢出
    public static void remove(){
        localpageInfoThreadLocal.remove();
    }
}
